import request from '@/utils/request'


// 1. 查询企业微信配置列表 (GET /system/basicEnterpriseWechatConfig/list)
export function listEnterpriseWechatConfig(params) {
  return request({
    url: '/basic/system/basicEnterpriseWechatConfig/list',
    method: 'get',
    params: params // 使用GET请求参数
  })
}

// 2. 导出企业微信配置列表 (POST /system/basicEnterpriseWechatConfig/export)
export function exportEnterpriseWechatConfig(data) {
  return request({
    url: '/basic/system/basicEnterpriseWechatConfig/export',
    method: 'post',
    data: data, // 使用POST请求体
    responseType: 'blob' // 二进制流响应
  })
}

// 3. 获取企业微信配置详细信息 (GET /system/basicEnterpriseWechatConfig/{enterpriseWechatConfigId})
export function getEnterpriseWechatConfig(enterpriseWechatConfigId) {
  return request({
    url: `/basic/system/basicEnterpriseWechatConfig/${enterpriseWechatConfigId}`,
    method: 'get'
  })
}

// 4. 新增企业微信配置 (POST /system/basicEnterpriseWechatConfig)
export function addEnterpriseWechatConfig(data) {
  return request({
    url: '/basic/system/basicEnterpriseWechatConfig',
    method: 'post',
    data: data // 使用POST请求体
  })
}

// 5. 修改企业微信配置 (PUT /system/basicEnterpriseWechatConfig)
export function updateEnterpriseWechatConfig(data) {
  return request({
    url: '/basic/system/basicEnterpriseWechatConfig',
    method: 'put',
    data: data // 使用PUT请求体
  })
}

// 6. 删除企业微信配置 (DELETE /system/basicEnterpriseWechatConfig/{enterpriseWechatConfigIds})
export function deleteEnterpriseWechatConfig(enterpriseWechatConfigIds) {
  return request({
    url: `/basic/system/basicEnterpriseWechatConfig/${enterpriseWechatConfigIds}`,
    method: 'delete'
  })
}


// 获取供应商下拉列表 
export function getSupplierTypeDict() {
  return request({
    url: '/basic/system/basicSupplierInfo/supplierList',
    method: 'get'
  })
}